package com.gotloop.jpa;

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.gotloop.jpa.UserProfile;

@Entity
public class Loop {

	@Id
	private Long uid;
	
	@Column(unique=true,nullable=false)
	private String url;
	
	private String title;
	
	@ManyToOne
	private UserProfile author;
	
	private boolean privateLoop;
	
	private boolean followersOnly;
	
	@OneToMany(mappedBy="loop")
	private List<Vote> karma;
	
	@OneToMany
	private List<Comment> comments;

	@OneToMany
	private List<Tag> tags;
	
	private Date creation;
	
	private Date deletion;
}
